package com.keyroy.game.puzzle_rpg.models.puzzle;


public class TilesRecord {
	private int[] record;

	public TilesRecord(PuzzleSet puzzleSet) {
		record = new int[puzzleSet.tileTypes.size()];
	}

	public final int count(TileType tileType) {
		return record[tileType.ID];
	}

	public final void add(TileType tileType, int count) {
		record[tileType.ID] += count;
	}

	public final void remove(TileType tileType, int count) {
		record[tileType.ID] -= count;
		if (record[tileType.ID] < 0) {
			record[tileType.ID] = 0;
		}
	}

}
